---
layout: default
---

<!-- Page Header -->
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 ">
                <div class="site-heading">
                    <h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
                    <!--<hr class="small">-->
                    <span class="subheading">{{ page.description }}</span>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- Main Content -->
<div class="container">
	<div class="row">
        {% if site.sidebar == false %}
<!-- NO SIDEBAR -->
    <!-- PostList Container -->
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 postlist-container">
                {{ content }}
            </div>
    <!-- Sidebar Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">

                <!-- Featured Tags -->
                {% if site.featured-tags %}
                <section>
                    <!-- no hr -->
                    <h5><a href="{{'/2-tags/' | prepend: site.baseurl }}">FEATURED TAGS</a></h5>
                    <div class="tags">
        				{% for tag in site.tags %}
                            {% if tag[1].size > {{site.featured-condition-size}} %}
                				<a href="{{ site.baseurl }}/2-tags/#{{ tag[0] }}" title="{{ tag[0] }}" rel="{{ tag[1].size }}">
                                    {{ tag[0] }}
                                </a>
                            {% endif %}
        				{% endfor %}
        			</div>
                </section>
                {% endif %}

                <!-- Friends Blog -->
                {% if site.friends %}
                <hr>
                <h5>MORE SITES</h5>
                <ul class="list-inline">
                    {% for friend in site.friends %}
                        <li><a href="{{friend.href}}">{{friend.title}}</a></li>
                    {% endfor %}
                </ul>
                {% endif %}
            </div>
        {% else %}

<!-- USE SIDEBAR -->
    <!-- PostList Container -->
    		<div class="
                col-lg-8 col-lg-offset-1
                col-md-8 col-md-offset-1
                col-sm-12
                col-xs-12
                postlist-container
            ">
    			{{ content }}
    		</div>
    <!-- Sidebar Container -->
            <div class="
                col-lg-3 col-lg-offset-0
                col-md-3 col-md-offset-0
                col-sm-12
                col-xs-12
                sidebar-container
            ">
                <!-- Featured Tags -->
                {% if site.featured-tags %}
                <section>
                    <hr class="hidden-sm hidden-xs">
                    <h5><a href="{{'/2-tags/' | prepend: site.baseurl }}">FEATURED TAGS</a></h5>
                    <div class="tags">
                        {% for tag in site.tags %}
                            {% if tag[1].size > {{site.featured-condition-size}} %}
                                <a href="{{ site.baseurl }}/2-tags/#{{ tag[0] }}" title="{{ tag[0] }}" rel="{{ tag[1].size }}">
                                    {{ tag[0] }}
                                </a>
                            {% endif %}
                        {% endfor %}
                    </div>
                </section>
                {% endif %}

                <!-- Short About -->
                <section class="visible-md visible-lg">
                    <hr><h5><a href="{{'/3-about/' | prepend: site.baseurl }}">ABOUT ME</a></h5>
                    <div class="short-about">
                        {% if site.sidebar-avatar %}
                            <a href="{{ site.baseurl }}/3-about">
                                <img src="{{site.sidebar-avatar}}"/>
                            </a>
                        {% endif %}
                        {% if site.sidebar-about-description %}
                            <p>{{site.sidebar-about-description}}</p>
                        {% endif %}
                        <!-- SNS Link -->
                        <ul class="list-inline">
                            {% if site.RSS %}
                            <li>
                                <a href="{{ "/feed.xml" | prepend: site.baseurl }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa fa-rss fa-stack-1x fa-inverse"></i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            <!-- add jianshu add target = "_blank" to <a> by BY -->
                            {% if site.jianshu_username %}
                            <li>
                                <a target="_blank" href="https://www.jianshu.com/u/{{ site.jianshu_username }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa  fa-stack-1x fa-inverse">简</i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            {% if site.twitter_username %}
                            <li>
                                <a href="https://twitter.com/{{ site.twitter_username }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            {% if site.zhihu_username %}
                            <li>
                                <a target="_blank" href="https://www.zhihu.com/people/{{ site.zhihu_username }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa  fa-stack-1x fa-inverse">知</i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            {% if site.weibo_username %}
                            <li>
                                <a target="_blank" href="http://weibo.com/{{ site.weibo_username }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            {% if site.facebook_username %}
                            <li>
                                <a target="_blank" href="https://www.facebook.com/{{ site.facebook_username }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            {% if site.github_username %}
                            <li>
                                <a target="_blank" href="https://github.com/{{ site.github_username }}">
                                    <span class="fa-stack fa-lg">
                                        <i class="fa fa-circle fa-stack-2x"></i>
                                        <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                                    </span>
                                </a>
                            </li>
                            {% endif %}
                            
                        </ul>
                        {% if site.email %}
                            <p>✉️ {{site.email}}</p>
                        {% endif %}
                    </div>
                </section>
                <!-- Friends Blog -->
                {% if site.friends %}
                <hr>
                <h5>MORE SITES</h5>
                <ul class="list-inline">
                    {% for friend in site.friends %}
                        <li><a href="{{friend.href}}">{{friend.title}}</a></li>
                    {% endfor %}
                </ul>
                {% endif %}
    		</div>
        {% endif %}
	</div>
</div>
